package com.example.park_management.service;

import com.example.park_management.entity.Constructionproject_kzx;
import com.example.park_management.mapper.ConstructionprojectMapper_kzx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConstructionprojectService_kzx {
    @Autowired
    private ConstructionprojectMapper_kzx constructionprojectMapper_kzx;
    public int save(Constructionproject_kzx constructionproject_kzx){ //没有id表示是新增
        if (constructionproject_kzx.getProjectID() == null){
            return constructionprojectMapper_kzx.insert(constructionproject_kzx);
        }else{//否则为更新
            return constructionprojectMapper_kzx.update(constructionproject_kzx);

        }

    }
}
